package cc.rengu.redp.bizimpl.igas.service.impl;

import cc.rengu.redp.bizimpl.igas.domain.PCertInfo;
import cc.rengu.redp.bizimpl.igas.domain.RRuleCfg;
import cc.rengu.redp.bizimpl.igas.dao.RRuleCfgMapper;
import cc.rengu.redp.bizimpl.igas.service.RRuleCfgService;
import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.common.utils.SortUtil;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author 刘玉亮.LL
 */
@Service
@DS("igas")
public class RRuleCfgServiceImpl extends ServiceImpl<RRuleCfgMapper, RRuleCfg> implements RRuleCfgService {
    @Override
    public IPage<RRuleCfg> findByPage(QueryRequest request, RRuleCfg info) {
        try {
            Page<RRuleCfg> page = new Page<>();
            SortUtil.handlePageSort(request, page, true);
            return this.page(page);
        } catch (Exception e) {
            log.error("查询失败", e);
            return null;
        }
    }
}
